package cuit.campus.taskRunning.user.entry.po;

import com.baomidou.mybatisplus.annotation.IdType;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import cuit.campus.taskRunning.user.enums.TaskStatusEnum;
import cuit.campus.taskRunning.user.enums.TaskTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Task {
    @TableId(type = IdType.AUTO)
    private Integer taskId;//任务id
    private Integer userId;//发布任务用户id

    private TaskTypeEnum taskType;//任务类型
    private String taskTitle;//任务名称
    private String taskDesc;//任务内容


    private Integer startAddressId;//起点地址id

    private Double startLng;//起点经度
    private Double startLat;//起点维度

    private Integer endAddressId;//任务终点

    private Double endLng;//终点经度
    private Double endLat;//终点维度
    private Double reward;//任务报酬


    private TaskStatusEnum taskStatus;//任务状态
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;//创建时间
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expireTime;//任务过期时间

}
